// default package
// Generated 2013/07/01 10:24:46 by Hibernate Tools 3.4.0.CR1
package edu.leo.dao.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * MUser generated by hbm2java
 */
@Entity
@Table(name = "m_user", catalog = "SSHAnnotationSample2")
public class MUser implements java.io.Serializable {

    private Long userId;
    private String name;
    private String loginId;
    private String password;
    private Date loginDate;
    private String lastPwdMod;
    private Integer pwdFailCnt;
    private Date insDate;
    private String insUserId;
    private Date updDate;
    private String updUserId;
    private Date delDate;
    private String delUserId;
    private String delFlg;
    private Long updCnt;

    public MUser() {
    }

    public MUser(Long userId) {
        this.userId = userId;
    }

    public MUser(Long userId, String name, String loginId, String password, Date loginDate, String lastPwdMod, Integer pwdFailCnt, Date insDate, String insUserId, Date updDate, String updUserId, Date delDate, String delUserId, String delFlg, Long updCnt) {
        this.userId = userId;
        this.name = name;
        this.loginId = loginId;
        this.password = password;
        this.loginDate = loginDate;
        this.lastPwdMod = lastPwdMod;
        this.pwdFailCnt = pwdFailCnt;
        this.insDate = insDate;
        this.insUserId = insUserId;
        this.updDate = updDate;
        this.updUserId = updUserId;
        this.delDate = delDate;
        this.delUserId = delUserId;
        this.delFlg = delFlg;
        this.updCnt = updCnt;
    }

    @Id
    // @GeneratedValue(strategy = GenerationType.AUTO)
    // @GeneratedValue(strategy = GenerationType.IDENTITY)
    // @GeneratedValue(strategy = GenerationType.SEQUENCE)
    // @GeneratedValue(strategy = GenerationType.TABLE, generator = "muserGen")
    // @TableGenerator(name = "muserGen", table = "hibernate_sequences",
    // pkColumnName = "sequence_name", pkColumnValue = "sequence_next_hi_value")
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "muserGen")
//    @GenericGenerator(name = "genFooTable",
//            strategy = "org.hibernate.id.enhanced.TableGenerator",
//            parameters = {
//                @Parameter(name = "table_name", value = "SEQUENCES"),
//                @Parameter(name = "value_column_name", value = "NEXTVALUE"),
//                @Parameter(name = "segment_column_name", value = "NAME"),
//                @Parameter(name = "segment_value", value = "genFooTable"),
//                @Parameter(name = "increment_size", value = "10"),
//                @Parameter(name = "optimizer", value = "org.mca.PooledIdOptimizer")
//            })
    @GenericGenerator(
        name = "muserGen", strategy = "org.hibernate.id.enhanced.TableGenerator",
        parameters = { @Parameter(name = "segment_value", value = "m_user")}
    )
    @Column(name = "user_id", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getUserId() {
        return this.userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Column(name = "name", length = 94)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "login_id", length = 50)
    public String getLoginId() {
        return this.loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    @Column(name = "password", length = 100)
    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "login_date", length = 19)
    public Date getLoginDate() {
        return this.loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    @Column(name = "last_pwd_mod", length = 8)
    public String getLastPwdMod() {
        return this.lastPwdMod;
    }

    public void setLastPwdMod(String lastPwdMod) {
        this.lastPwdMod = lastPwdMod;
    }

    @Column(name = "pwd_fail_cnt", precision = 2, scale = 0)
    public Integer getPwdFailCnt() {
        return this.pwdFailCnt;
    }

    public void setPwdFailCnt(Integer pwdFailCnt) {
        this.pwdFailCnt = pwdFailCnt;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "ins_date", length = 19)
    public Date getInsDate() {
        return this.insDate;
    }

    public void setInsDate(Date insDate) {
        this.insDate = insDate;
    }

    @Column(name = "ins_user_id", length = 20)
    public String getInsUserId() {
        return this.insUserId;
    }

    public void setInsUserId(String insUserId) {
        this.insUserId = insUserId;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "upd_date", length = 19)
    public Date getUpdDate() {
        return this.updDate;
    }

    public void setUpdDate(Date updDate) {
        this.updDate = updDate;
    }

    @Column(name = "upd_user_id", length = 20)
    public String getUpdUserId() {
        return this.updUserId;
    }

    public void setUpdUserId(String updUserId) {
        this.updUserId = updUserId;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "del_date", length = 19)
    public Date getDelDate() {
        return this.delDate;
    }

    public void setDelDate(Date delDate) {
        this.delDate = delDate;
    }

    @Column(name = "del_user_id", length = 20)
    public String getDelUserId() {
        return this.delUserId;
    }

    public void setDelUserId(String delUserId) {
        this.delUserId = delUserId;
    }

    @Column(name = "del_flg", length = 1)
    public String getDelFlg() {
        return this.delFlg;
    }

    public void setDelFlg(String delFlg) {
        this.delFlg = delFlg;
    }

    @Column(name = "upd_cnt", precision = 18, scale = 0)
    public Long getUpdCnt() {
        return this.updCnt;
    }

    public void setUpdCnt(Long updCnt) {
        this.updCnt = updCnt;
    }

}
